from pydantic_settings import BaseSettings
from functools import lru_cache

class Settings(BaseSettings):
    #https://open.feishu.cn/open-apis/bot/v2/hook/2c6ad13b-cd57-41cf-9caf-10e58c76ac3a
    feishu_url_prefix: str ="https://open.feishu.cn/open-apis/bot/v2/hook"
    #两种类型post和interactive
    feishu_alert_type: str ="interactive"
    #完整的url
    feishu_url: str=""
    #校验值
    secret: str=""
    class Config:
        env_file = ".env"


@lru_cache
def get_settings():
    return Settings()

settings=get_settings()